<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>	
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<link rel="stylesheet" href="css/amazeui.min.css">
<link rel="stylesheet" href="css/admin.css">
<style>
.admin-main {
	padding-top: 0px;
}
</style>
</head>
<body>

		<div class="am-cf admin-main">
			<!-- content start -->
			<div class="admin-content">
				<div class="admin-content-body">
					<div class="am-g">
						<form target="right"  class="am-form am-form-horizontal" action="addUser.do" method="post" style="padding-top: 30px;">
							<input value="${emp.eid }" name="eid" type="hidden">
							<div class="am-form-group">
								<label for="user-name" class="am-u-sm-3 am-form-label">
									员工姓名
								</label>
								<div class="am-u-sm-9">
									<input id="roleName" required="" placeholder="请输入员工姓名" value="${emp.realname }" name="realname" type="text">
									<small id="helpRole">输入员工姓名。</small>
								</div>
							</div>
							<div class="am-form-group">
								<label for="username" class="am-u-sm-3 am-form-label">
									用户名
								</label>
								<div class="am-u-sm-9">
									<input type="text" name="ename" value="" placeholder="请输入用户用户名"  />
									<small>输入用户名。</small>
								</div>
							</div>
							<div class="am-form-group">
								<label for="user-name" class="am-u-sm-3 am-form-label">
									密码
								</label>
								<div class="am-u-sm-9">
									<input type="password" name="epass" value="" placeholder="请输入用户密码"  />
									<small>输入密码。</small>
								</div>
							</div>
							<div class="am-form-group">
								<label for="user-name" class="am-u-sm-3 am-form-label">
									性别
								</label>
								<div class="am-u-sm-9">
									<input type="radio" name="esex" value="0" <c:if test="${emp.esex==0 }">checked="checked"</c:if>  /> 男
									<input type="radio" name="esex" value="1" <c:if test="${emp.esex==1 }">checked="checked"</c:if> style="margin-left: 30px;"/> 女<br>
									<small>选择性别。</small>
								</div>
							</div>
							<div class="am-form-group">
								<label for="user-name" class="am-u-sm-3 am-form-label">
									所在部门
								</label>
								<div class="am-u-sm-9">
									<select placeholder="请选择所在部门" name="did">
									<c:forEach items="${departList }" var="depart">
										<option  <c:if test="${emp.did==depart.did }">selected</c:if> value="${depart.did }">${depart.dname }</option>
									</c:forEach>										
									</select>
									<!--<textarea rows="" cols="50" placeholder="请输入用户密码" name="roleDesc"></textarea>-->
									<small>选择所在部门。</small>
								</div>
							</div>
							<div class="am-form-group">
								<label for="user-name" class="am-u-sm-3 am-form-label">
									用户角色
								</label>
								<div class="am-u-sm-9">
									<select placeholder="请选择用户角色" name="position">
										<option <c:if test="${emp.position==2 }">selected</c:if> value="2">普通员工</option>
										<option <c:if test="${emp.position==1 }">selected</c:if> value="1">部门主管</option>
										<option <c:if test="${emp.position==0 }">selected</c:if> value="0">BOSS</option>
										</select>
									<small>请选择用户角色。</small>
								</div>
							</div>
							<div class="am-form-group">
								<div class="am-u-sm-9 am-u-sm-push-3">
									<input id="addRole" class="am-btn am-btn-success" value="编辑员工" type="submit">
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
</body>
</html>